#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
//	system("start https://www.lanqiao.cn/problems/19949/learning/");

    int n;
    cin >> n;

    while(n--) {
        string s;
        cin >> s;

        if(s != "0")
            s += "0";
        else
            s = "1";

        cout << s << endl;
    }

    return 0;
}

